package com.hernie.user.controller;

import com.hernie.user.service.LoginService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
public class SendCodeController {
    @Resource
    private LoginService loginService;

    @PostMapping("/sendCode")
    public Map<String, Object> sendCode(@RequestParam("phone") String phone){
        return loginService.sendCode(phone);
    }
}
